<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var num1 =30
    var num2 =20
    if(num1>num2){
        console.log(num1)
    }else{
        console.log(num2)
    }
    console.log( num1>num2 ? num1:num2)
</script>